package edu.sctu.nieyu.day20150505.method1;

import edu.sctu.nieyu.day20150505.method1.Dog1;
import edu.sctu.nieyu.day20150505.method1.Interf;


/**
 * Created by user01 on 2015/5/5.
 */
public class Output {
    public static void main(String[] args) {
        Interf interf;
        Dog1 dog1 = new Dog1();
        dog1.getColor();
        dog1.getSize();
        dog1.getAction();
        dog1.getMessage(new Interf() {
            @Override
            public void getString(String color, String size, String action) {
                System.out.println("颜色："+color+"大小："+size+"动作："+action);

            }
        });
        Dog2 dog2 = new Dog2();
        dog2.getColor();
        dog2.getSize();
        dog2.getAction();
        dog2.getMessage(new Interf() {
            @Override
            public void getString(String color, String size, String action) {
                System.out.println("颜色："+color+"大小："+size+"动作："+action);
            }
        });

    }


}


